<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>

</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
<link href="<?php echo $this->_webroot('/user/css/shoprequest.css'); ?>" rel="stylesheet" type="text/css" />   
    <div class="main-right main_right">
	

            <div class="cont">
            <div class="cont_title">投诉</div>             

			<form action="<?php echo $this->_url('user/complaint/');?>" method="post" name="form_profile" onsubmit="return checkform1();">
				<table width="100%" style="border:0" cellspacing="0">
					<tr>
					    <td class="textright" width="100px;">被投诉人：</td>
						<td class="textleft">
						<?php foreach($order_rs as $val){?>
						    <?php if ($val['a']['shop_id']) { ?>
						<a href="shop.php?shopid=<?php echo  $val['a']['shop_id'];?>&app=index" target="_blank"><?php echo $val['c']['shop_name'];?></a>
						<input type="hidden" name="data[shopid]" value="<?php echo $val['a']['shop_id'];?>">
						<input type="hidden" name="data[shop_name]" value="<?php echo $val['c']['shop_name'];?>">
						    <?php break; }?>
						<?php }?>
						</td>
					</tr>
					<tr>
					    <td class="textright">相关商品：</td>
						<td class="textleft">
						    <?php $i = 0 ;foreach($order_rs as $k =>$val){ $i ++ ; ?>
						    <a href="<?php echo $this->_url('shop/productshow/'.$val['og']['goods_id']);?>" target="_blank">[<?php echo $k;?>]&nbsp;<?php echo $val['og']['goods_name'];?></a>
							    <?php if ($i<=1) { ?>
							        <input type="hidden" name="data[goods_id]" value="<?php echo $val['og']['goods_id'];?>">
							        <input type="hidden" name="data[goods_name]" value="<?php echo $val['og']['goods_name'];?>">
							    <?php }?>
							<br/>
							<?php }?>
						</td>
					</tr>
					<tr>
					    <td class="textright">投诉原因：</td>
					    <td class="textleft">
						<select name="data[complaints_title]" id="complaints_title" require="true" datatype="Require" msg="请选择投诉原因"  >
		            	<option selected>请选择投诉原因</option>
						<?php foreach($complaints_title as $val){?>
							<option value="<?php echo $val['complainttype']['type_content'];?>"><?php echo $val['complainttype']['type_content'];?></option>
						<?php }?>
		              	</select>
					  	<span id="ShowTypeMsg" style="padding-left:5px;">请选择正确的投诉原因，否则您将失去本交易投诉的机会。</span></td></tr>
					<tr>
					    <td class="textright" valign="top">投诉内容：</td>
						<td class="textleft"><textarea name="data[complaints_content]" id="complaints_content" cols="60" rows="10" require="true" datatype="Require" msg="请输入投诉内容" class="inputmain" onblur="cutSize(this,500);countShow2(this.value,'count');" onkeyup="cutSize(this,500);countShow2(this.value,'count');"></textarea>
					     <br />(当前<span id="count">0</span>字节,最多500字节)<br /><span style="padding:10px; ">请您尽可能提供真实且详细的纠纷描述及证据（包括聊天记录、商品图片及相关链接），这样我们才能在最快的时间里更正确地给您处理投诉。</span>
					    </td>
					</tr>
                    <tr>
		                <td class="textright">验证码：</td>
		                <td class="textleft " style="vertical-align:middle"><input type="text" class="border_c" name="data[veriCode]" id="veriCode" style="width:100px; *margin:0 15px  13px 0;" maxlength="4" /> 
		          	<img border="0" src="<?php echo $this->_url('user/kcaptcha') .'?'. time(); ?>" width="80" height="40" align="absmiddle"  id="verCodePic"><a style="display:inline-block;*margin:0 0 13px 10px" href="javascript:;" onclick="return getVerCode();">看不清,换一张</a></td>
		             </tr>
					<tr><td colspan="2" align="center"><input class="submit" type="submit" name="submit" value="提交" /></td></tr>
				</table>
				<input type="hidden" name="data[order_id]" value="<?php echo $order_id;?>">
			</form>
			  
			  
            </div>
	
	

        

    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
<script language="JavaScript">
<!--
function cutSize(obj,len)
{
	//obj.value = obj.value.replace(/(^[\s]*)|([\s]*$)/g, "");
	var str = obj.value;
	if(str.replace(/[^\x00-\xff]/g,'**').length <= len)
	{
		return;
	}
	str = str.substr(0,len);
	while(str.replace(/[^\x00-\xff]/g,'**').length > len)
	{
		str = str.substr(0,str.length -1);
	}
	obj.blur();
	obj.value = str;
	obj.focus();
}

function countShow2(str,idName)
{
	document.getElementById(idName).innerHTML=str.replace(/[^\x00-\xff]/g,'**').length;
}
function checkform1(){
	var type = document.getElementById('complaints_title').value;
	var content = document.getElementById('complaints_content').value;
	var veriCode = document.getElementById("veriCode").value;
	if(type.length==0){
		alert("请选择投诉原因！");
		return false;
		}
	if(content.length==0){
		alert("请输入投入内容！");
		return false;
		}
	if(!veriCode){
		alert('请输入验证码！');
		return false;
	}
}
function getVerCode() {
	document.getElementById("verCodePic").src="<?php echo $this->_url('user/kcaptcha') .'?'; ?>"+Math.random(1);
	return false;
}
//-->
</script>
</body>
</html>